import datetime

from sqlalchemy import Column, Integer, String, UniqueConstraint, Index, DateTime, Float

from IntelligentDocumentReview.DbInit.mysqlDb import Base


class Orders(Base):
    __tablename__ = 'orders'
    id = Column(Integer, primary_key=True)
    customerId = Column(Integer)
    customerName = Column(String(32))
    nextPersonId = Column(Integer)
    nextPersonName = Column(String(32))
    status = Column(Integer)
    amountMoney = Column(Float)
    # commodityList = []
    commodityListStr = Column(String(10240))
    reviewType = Column(Integer)
    replyStatus = Column(Integer)
    endReplyTime = Column(DateTime)
    createdAt = Column(DateTime, default=datetime.datetime.now)
    updatedAt = Column(DateTime, default=datetime.datetime.now)
